<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>学生更新页-表单</title>
</head>
<body>
    <form action="/students/update/<%= student._id %> " method="POST" enctype="application/x-www-form-urlencoded" >
        <lable>学号:</lable>
        <input readonly="readonly" type="text" name="no" placeholder="请输入学号" value="<%= student.stuNo %>"><br>
        <label>姓名:</label>
        <input type="text" name="name" placeholder="请输入姓名" value="<%= student.name %>"><br>
        <label>年龄:</label>
        <input type="text" name="age" placeholder="请输入年龄" value="<%= student.age %>"><br>

        <label>性别:</label>
        <select name="gender">
            <option value="0" <% if(student.gender=='0'){ %>selected<% } %> >未选择</option>
            <option value="1" <% if(student.gender=='1'){ %>selected<% } %> >男</option>
            <option value="2" <% if(student.gender=='2'){ %>selected<% } %> >女</option>
        </select><br>
        <label>电话☎️:</label>
        <input type="text" name="phone" placeholder="请输入电话号码" value="<%= student.phone %>"><br>

        <!-- todo 上传头像 -->
        <!-- <input type="file" name="avatar" > -->
        <!--  如果不想在action中传id参数，可以  input value=‘id’ class=   -->
        <button type="submit">➕添加</button>
        
    </form>
</body>
</html>